import request from '@/utils/request'

// 查询周期班列表
export function listCycle(query) {
  return request({
    url: '/business/cycleShift/list',
    method: 'get',
    params: query
  })
}

// 查询周期班详细
export function getCycle(id) {
  return request({
    url: '/business/cycleShift/' + id,
    method: 'get'
  })
}

// 新增周期班
export function addCycle(data) {
  return request({
    url: '/business/cycleShift',
    method: 'post',
    data: data
  })
}

// 修改周期班
export function updateCycle(data) {
  return request({
    url: '/business/cycleShift',
    method: 'put',
    data: data
  })
}

// 删除周期班
export function delCycle(id) {
  return request({
    url: '/business/cycleShift/' + id,
    method: 'delete'
  })
}

//查询所有周期班
export function listCycleAll(query) {
  return request({
    url: '/business/cycleShift/getAll',
    method: 'get',
    params: query
  })
}